{% extends 'layout.njk' %}
{% block content %}
    <div>
        password:
        <input class='password'/>
    </div>
    <div>
        repassword:
        <input class='repassword'/>
    </div>
{% endblock %}

{% block script %}

    <script>
        let password = document.querySelector('.password')
        let pwd = document.querySelector('.repassword')
        pwd.onblur = function () {
            let PasswordValue = password.value
            let PwdValue = pwd.value
            if (PasswordValue && PwdValue) {
                if (PasswordValue === PwdValue) {
                    location.href = '/userinfoRegist'
                } else {
                    alert('输入的密码不一致')
                }
            }else{
                alert('请输入密码')
            }

        }
    </script>
{% endblock %}